package com.simon.hse.activity.safe.safeedu;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.simon.hse.R;
import com.simon.hse.activity.BaseActivity;
import com.simon.hse.activity.SignActivity;

import org.xutils.view.annotation.ContentView;
import org.xutils.view.annotation.Event;
import org.xutils.view.annotation.ViewInject;

/**
 * 特种作业安全教育记录表详情
 */
@SuppressWarnings("all")
@ContentView(R.layout.activity_safe_education_details)
public class SafeEducationDetailsActivity extends BaseActivity {
    @ViewInject(R.id.tv_common_title)
    TextView mTv_common_title;
    @ViewInject(R.id.ll_bottom)
    LinearLayout llBottom;

    private boolean isShowBottom = false;

    String from;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        mTv_common_title.setText("特种作业安全教育记录表详情");
        Bundle bundle = getIntent().getExtras();
        from = bundle.getString("from");
        if (from.equals("query")) {
            llBottom.setVisibility(View.GONE);
        }
    }

    @Event(value = {R.id.iv_common_left, R.id.tv_train_record_cancel, R.id.tv_train_record_confirm})
    private void finish(View view) {
        switch (view.getId()) {
            case R.id.iv_common_left:
                finish();
                break;
            case R.id.tv_train_record_cancel:
                finish();
                break;
            case R.id.tv_train_record_confirm:
                startActivity(new Intent(SafeEducationDetailsActivity.this, SignActivity.class));
                finish();
                break;
        }
    }
}
